package com.wtf.dsp.admin.model.dto;

import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
import lombok.ToString;
import org.hibernate.validator.constraints.Length;

import javax.validation.constraints.NotBlank;
import javax.validation.constraints.NotEmpty;
import javax.validation.constraints.Pattern;
import java.util.List;

/**
 * ClassName: NsDelDTO
 * Description:
 * date: 2023/7/7 17:55
 *
 * @author linhuanyou
 * @version 1.0
 */
@Data
@ToString
@ApiModel("SQL删除请求类")
public class SqlDelDTO {
    @ApiModelProperty(value = "命名空间")
    @Length(min = 0,max = 20,message = "请输入不超过20个字符")
    @Pattern(regexp = "^[-a-zA-Z0-9]+$",message = "请输入英文、数字、-的字符的命名空间")
    @NotBlank(message = "请输入命名空间")
    private String ns;
    @ApiModelProperty(value = "数据源")
    @Length(min = 0,max = 20,message = "请输入不超过20个字符")
    @Pattern(regexp = "^[-a-zA-Z0-9]+$",message = "请输入英文、数字、-的字符的数据源")
    @NotBlank(message = "请输入数据源")
    private String ds;
    @ApiModelProperty(value = "Mapper名称空间")
    @Length(min = 0,max = 50,message = "请输入不超过50个字符")
    @Pattern(regexp = "^[a-zA-Z0-9]+$",message = "请输入英文、数字的字符的Mapper名称空间")
    @NotBlank(message = "请输入Mapper名称空间")
    private String mns;
    @ApiModelProperty(value = "SQL标识集")
    @NotEmpty(message = "请输入SQL标识集")
    private List<String> sqlIds;
}
